// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import router from './router'
import http from '@/utils/http'
import storage from '@/utils/storage'
import '@/utils/string'

// 页面之间逻辑太简单，暂时没必用上 vuex
// import store from '@/store'

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap/dist/js/bootstrap.min.js'
import 'adminlte/dist/css/AdminLTE.min.css'
import 'adminlte/dist/css/skins/_all-skins.min.css'
import 'adminlte/dist/js/adminlte.min.js'
import 'font-awesome/css/font-awesome.min.css'
import '@/assets/css/style.css'

Vue.config.productionTip = false
Vue.prototype.$http = http
Vue.prototype.$storage = storage
Vue.use(ElementUI)

import common from '@/modules/common/ServiceProvider.js'
import account from '@/modules/account/ServiceProvider.js'
import redpacket from '@/modules/red-packet/ServiceProvider.js'
import resource from '@/modules/resource/ServiceProvider.js'
import turntable from '@/modules/turntable/ServiceProvider.js'

Vue.use(common, { router })
Vue.use(account, { router })
Vue.use(redpacket, { router })
Vue.use(resource, { router })
Vue.use(turntable, { router })

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  // store,
  template: '<App/>',
  components: { App },
})
